<template>
  <div class="simpleInf-box">
    <Head :title= "Title"></Head>
    <div class="head-IFM">
      <span></span>
      <p>开立账户</p>
    </div>

    <Progress :Protitle="Protitle" :stepForm=1></Progress>
    <div class="simpleInf-form">
      <div class="withdraw-bankInfo">
        <p>
          <label>姓</label>
          <input type="text" v-model="firstName">
        </p>
        <p>
          <label>名</label>
          <input type="text" v-model="lastName" placeholder="">
        </p>
        <p>
          <label>电子邮箱</label>
          <input type="text" v-model="eMail" placeholder="">
        </p>
        <p>
          <label>联系电话</label>
          <input type="text" v-model="phone" placeholder="">
        </p>
        <p>
          <label>密码</label>
          <input type="password" v-model="passWord"  ref="pwd" placeholder="">
          <i :class="{codeIcon: true,codeIsShow: codeIsShow}" @click="codeShow()"></i>
        </p>
      </div>
      <div class="withdraw-btn" @click="checkForm(firstName,lastName,' ',eMail,phone,passWord,type) ? nextPage() : '' ">下一步</div>
    </div>
  </div>
</template>

<script>
  import { Ajax } from "@/mixins";
  import Head from '../../components/header/head.vue'
  import Progress from '../../components/pogressBar/progressBar.vue'

  const accountinfo1 = `/account/accountinfo/${this.step}`;

  export default {
//    naem: "rewardPop",
    mixins: [Ajax],
    components: {
      Head,
      Progress
    },
    props: {

    },
    data() {
      return {
        Title: '开设真实账户',
        Protitle: '2 填写基本信息',
        codeIsShow: true,
        firstName: 'Tian',
        lastName: 'yali',
        eMail: '123@163.com',
        phone: '183223290',
        passWord: '123456a',
        type: 2,     //账户信息验证
        formFtep1: [],
        step: 1
      };
    },
    watch: {

    },
    methods: {
      /*密码显示*/
      codeShow: function(){
        this.codeIsShow = !this.codeIsShow
        this.$refs.pwd.type = this.codeIsShow ? "password" : "text"
      },
      /*下一步跳转页*/
      nextPage: function () {
        this.post(accountinfo1, {
          step: this.step,
          firstName: this.firstName,
          lastName: this.lastName,
          semail: this.semail,
          smobile: this.smobile,
          accountPass: this.accountPass,
          brokerId: this.$route.query.brokerId,    //经济商id
        }).then(body => {
          this.formFtep1 = body.data
          if(body.code == 200){
            this.$router.push({
              path: '/importantInformation',
              query: {
                native: 0,
                sid: this.formFtep1.sid,
                firstName: this.formFtep1.firstName,
                lastName: this.formFtep1.lastName
                /*token: _this.getToken()*/
              }
            })
          }
        });
      },

    },
    mounted(){

    }
  };
</script>

<style scoped>
  .simpleInf-box{
    background: #eee;
  }
  .head-IFM{
    height: 1.79rem;
    padding: 0.64rem 0.56rem 0 0.56rem;
    background: #8e79c0;
    display: flex;
  }
  .head-IFM span{
    display: block;
    width: 1.71rem;
    height: 0.85rem;
    background: url("../../assets/images/right-logo-economic.png") no-repeat center/100% 100%;
  }
  .head-IFM p{
    margin: 0.26rem 0 0 0.3rem;
    font-size: 0.48rem;
    color: #fff;
  }

  .simpleInf-form{
    margin: 0.3rem auto 0 auto;
    height: 100%;
    background: #fff;
  }

  .withdraw-bankInfo{
    padding:.6rem .54rem 0;
  }
  .withdraw-bankInfo p{
    position: relative;
    height: .9rem;
    line-height: .9rem;
    margin-bottom:.4rem;
  }
  .withdraw-bankInfo label{
    vertical-align: middle;
    font-size:.45rem;
    color: #666;
    min-width:1.9rem;
    display: inline-block;
    text-align: left;
  }
  .withdraw-bankInfo input,.withdraw-bankInfo select{
    display: inline-block;
    width:8.84rem;
    height:.9rem;
    line-height: .9rem;
    font-size:.45rem;
    vertical-align: middle;
    padding:0 .6rem;
    border-bottom:.03rem solid #ede9f5;
    box-sizing: border-box;
  }
  .withdraw-bankInfo input:focus {
    border-color: #8e79c0;
  }
  .withdraw-remark > label{
    vertical-align: top;
  }
  .withdraw-bankInfo textarea{
    width: 8.86rem;
    height: 2.07rem;
    border-radius: .12rem;
    border: solid 0.03rem #d2c9e6;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding:.23rem .6rem;
    font-size:.45rem;
  }

  .withdraw-btn{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 1.32rem;
    line-height: 1.32rem;
    background-color: #8e79c0;
    border-radius: .12rem;
    margin:.6rem .24rem;
    color: #fff;
    font-size:.54rem;
    text-align: center;
  }
  .codeIcon{
    position: absolute;
    bottom: -0.1rem;
    right: 0.32rem;
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    background: url("../../assets/images/code-show.png") no-repeat center/75% 50%;
  }
  .codeIsShow{
    background: url("../../assets/images/code-no-show.png") no-repeat center/65% 40%;
  }

</style>
